Socket
Socket
Sign inDemoInstall

@node-rs/helper

Package Overview
Dependencies
1
Maintainers
2
Versions
26
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @node-rs/helper

Helper library for node-rs


Version published
Maintainers
2
Install size
13.7 kB
Created

Readme

Source

@node-rs/helper

install size Downloads

Helper library for load native package.

Usage

locateBinding

Load native binding file from dirname

loadBinding(dirname: string, filename?: string = 'index', packageName?: string): string
  • dirname, dirname which the .node binding file located

  • filename, the napi.name filed in you package.json

  • packageName, the name filed in your package.json, @swc/core for example.

  • return native module

const { loadBinding } = require('@node-rs/helper')

module.exports = loadBinding(__dirname, 'swc', '@swc/core')

Keywords

FAQs

Last updated on 21 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc